/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.orderoid.ejb.domain;

import java.io.Serializable;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Dahlia
 */
@Entity
@Table(name = "marque_blanche")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "MarqueBlanche.findAll", query = "SELECT m FROM MarqueBlanche m"),
    @NamedQuery(name = "MarqueBlanche.findByIdMb", query = "SELECT m FROM MarqueBlanche m WHERE m.idMb = :idMb"),
    @NamedQuery(name = "MarqueBlanche.findByRaisonSociale", query = "SELECT m FROM MarqueBlanche m WHERE m.raisonSociale = :raisonSociale"),
    @NamedQuery(name = "MarqueBlanche.findByNumRcs", query = "SELECT m FROM MarqueBlanche m WHERE m.numRcs = :numRcs"),
    @NamedQuery(name = "MarqueBlanche.findByNumSiret", query = "SELECT m FROM MarqueBlanche m WHERE m.numSiret = :numSiret"),
    @NamedQuery(name = "MarqueBlanche.findByCodeApe", query = "SELECT m FROM MarqueBlanche m WHERE m.codeApe = :codeApe")})
public class MarqueBlanche implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id_mb")
    private Integer idMb;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 200)
    @Column(name = "raison_sociale")
    private String raisonSociale;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 12)
    @Column(name = "num_rcs")
    private String numRcs;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 14)
    @Column(name = "num_siret")
    private String numSiret;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 2)
    @Column(name = "code_ape")
    private String codeApe;

    public MarqueBlanche() {
    }

    public MarqueBlanche(Integer idMb) {
        this.idMb = idMb;
    }

    public MarqueBlanche(Integer idMb, String raisonSociale, String numRcs, String numSiret, String codeApe) {
        this.idMb = idMb;
        this.raisonSociale = raisonSociale;
        this.numRcs = numRcs;
        this.numSiret = numSiret;
        this.codeApe = codeApe;
    }

    public Integer getIdMb() {
        return idMb;
    }

    public void setIdMb(Integer idMb) {
        this.idMb = idMb;
    }

    public String getRaisonSociale() {
        return raisonSociale;
    }

    public void setRaisonSociale(String raisonSociale) {
        this.raisonSociale = raisonSociale;
    }

    public String getNumRcs() {
        return numRcs;
    }

    public void setNumRcs(String numRcs) {
        this.numRcs = numRcs;
    }

    public String getNumSiret() {
        return numSiret;
    }

    public void setNumSiret(String numSiret) {
        this.numSiret = numSiret;
    }

    public String getCodeApe() {
        return codeApe;
    }

    public void setCodeApe(String codeApe) {
        this.codeApe = codeApe;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idMb != null ? idMb.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MarqueBlanche)) {
            return false;
        }
        MarqueBlanche other = (MarqueBlanche) object;
        if ((this.idMb == null && other.idMb != null) || (this.idMb != null && !this.idMb.equals(other.idMb))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.orderoid.ejb.domain.MarqueBlanche[ idMb=" + idMb + " ]";
    }
    
}
